import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex) // vue的插件机制

// Vuex.Store 构造器选项
const store = new Vuex.Store({
    state: {
		userInfo: null,
		token: "",
        appVersion: '1.0.0',
		aboutText: "亿德经营"
    },
	mutations: {
		setUserInfo(state, userInfo){
			state.userInfo = userInfo;
		},
		setToken(state, token){
			state.token = token;
		}
	},
	getters:{
		getUserInfo(state){
			return state.userInfo;
		},
		getAppVersion(state){
			return state.appVersion;
		},
		getToken(state){
			return state.token;
		}
	},
	actions: {
		
	}
})

export default store
